*** NEED TO INSTALL THE FOLLOWING COMMANDS

***  findit outreg2
***  findit spost13
***  findit relogit
***  findit fitstat
***  findit listcoef

******************************** Main Text ***********************************

*** Table 1 Irredentist Conflicts by Institution:
tab Institution2 irredentism, row
*** Table 2 Logistic Regression Results
logit irredentism ib1.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using MainModel.doc, dec(2) replace
fitstat
listcoef, percent
mchange Institution2, stats(change from to pvalue)
*** Figure 3: Empirical Results: Predicted Probability of Irredentism by 
margins, at(Institution2 = (1 2 3 4))
marginsplot, scheme(s1mono) recast (scatter) horizontal yscale(reverse)


**************************Supplementary Materials ****************************
*** Note for replication - we manually moved the majoritarian category results
*** from the bottom of each table to the top of each table

** Appendix Table 1
logit irredentism ib1.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using LogitResults.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using LogitResults.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using LogitResults.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using LogitResults.doc, dec(2) append ctitle(Military/Personal)

** Appendix Table 2 (As Rare Events) 
relogit irredentism PROP2 PART2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed if Institution != 5, cluster(triadcode) 
outreg2 using Rare.doc, dec(2) replace ctitle(MajRare)
*** Excluding Proportional
relogit irredentism MAJ2 PART2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed if Institution != 5, cluster(triadcode) 
outreg2 using Rare.doc, dec(2) append ctitle(PropRare)
*** Excluding Party
relogit irredentism MAJ2 PROP2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed if Institution != 5, cluster(triadcode) 
outreg2 using Rare.doc, dec(2) append ctitle(PartRare)
** Excluding Military_Personal
relogit irredentism MAJ2 PROP2 PART2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed if Institution != 5, cluster(triadcode) 
outreg2 using Rare.doc, dec(2) append ctitle(Mil/PersRare)

** Appendix Table 3: Regional Controls
logit irredentism ib1.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet EEurope CenAsiaNAfrica Asia SubSahAfrica peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using RegionalControls.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet EEurope CenAsiaNAfrica Asia SubSahAfrica peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using RegionalControls.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet EEurope CenAsiaNAfrica Asia SubSahAfrica peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using RegionalControls.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet EEurope CenAsiaNAfrica Asia SubSahAfrica peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using RegionalControls.doc, dec(2) append ctitle(Military/Personal)

** Appendix Table 4: Inclusion of Original Geddes et al. Regime Types
logit irredentism ib1.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) append ctitle(Military)
logit irredentism ib5.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) append ctitle(Monarchy)
logit irredentism ib6.Institution anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Geddes.doc, dec(2) append ctitle(Personal)

** Appendix Table 5a: Irredentist Democracy, Autocracy, and Anocracy
logit irredentism ib1.Institution2 irrdemocl irrautocl irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using IrrRegime.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 irrdemocl irrautocl irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using IrrRegime.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 irrdemocl irrautocl irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using IrrRegime.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 irrdemocl irrautocl irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using IrrRegime.doc, dec(2) append ctitle(Military/Personal)

** Appendix Table 5b: Parliamentary/Presidential Systems
logit irredentism ib1.Institution2 i.ParlPres anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ParlPres.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 i.ParlPres anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ParlPres.doc, dec(2) append ctitle(Majoritarian)
logit irredentism ib3.Institution2 i.ParlPres anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ParlPres.doc, dec(2) append ctitle(Majoritarian)
logit irredentism ib4.Institution2 i.ParlPres anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ParlPres.doc, dec(2) append ctitle(Majoritarian)

*** Appendix Table 6: Without anocracy and former Soviet controls
logit irredentism ib1.Institution2 irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using FewerControls.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using FewerControls.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using FewerControls.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using FewerControls.doc, dec(2) append ctitle(Military/Personal)

** Appendix Table 7: Map Anocracy onto Regimes
** 7a
tab Institution2 anoano, row
** 7b
tab Institution2 anono, row
** 7c
tab Institution2 noano, row
** 7d
tab Institution2 nono, row

*** Apppendix Table 8a: Ethno-Religious Crosscutting Cleavages; economic controls
logit irredentism ib1.Institution2 erc anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) replace ctitle(Majoritarian)
logit irredentism ib2.Institution2 erc anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 erc anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 erc anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Military/Personal)
logit irredentism ib1.Institution2 irrhigh irrlow groupGDPRATIO anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Majoritarian)
logit irredentism ib2.Institution2 irrhigh irrlow groupGDPRATIO anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Proportional)
logit irredentism ib3.Institution2 irrhigh irrlow groupGDPRATIO anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Party)
logit irredentism ib4.Institution2 irrhigh irrlow groupGDPRATIO anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using crosscuta.doc, dec(2) append ctitle(Military/Personal)

*** Apppendix Table 8b:Proportional/ethnic interaction
logit irredentism PROP2##c.ef PART2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ProportionalEthnic.doc, dec(2) replace ctitle(Proportional/Ethnic)
logit irredentism PROP2##c.rf PART2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ProportionalEthnic.doc, dec(2) append ctitle(Proportional/Religious)
logit irredentism PROP2##c.erc PART2 MIL2 anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using ProportionalEthnic.doc, dec(2) append ctitle(Proportional/Crosscut)

** Appendix Table 9: Host/Enclave Characteristic Controls
logit irredentism ib1.Institution2 hostef anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) replace ctitle(Fract Majoritarian)
logit irredentism ib2.Institution2 hostef anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(Fract Proportional)
logit irredentism ib3.Institution2 hostef anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(Fract Party)
logit irredentism ib4.Institution2 hostef anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(Fract Military/Personal)
logit irredentism ib1.Institution2 hostnumgrps anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(#Majoritarian)
logit irredentism ib2.Institution2 hostnumgrps anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(#Proportional)
logit irredentism ib3.Institution2 hostnumgrps anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(#Party)
logit irredentism ib4.Institution2 hostnumgrps anoano anono noano irrmargin hostdispersed  hostdiscrim countryGDPRATIO hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using Host.doc, dec(2) append ctitle(#Military/Personal)

** Appendix Table 10: Comparison with Siroky and Hale 2017
logit irredentism irrmargin MAJ2 MAJ2Xirrmargin hostdispersed irrhigh irrlow hostdiscrim countryGDPRATIO anoano anono noano hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using modelcompare.doc, dec(2) replace ctitle(Original)
fitstat, saving(m1)
estat classification
lroc
*Manually Calculate F1 = TP / (TP + 0.5*(FP + FN)): TP = 84; FN = 29; TN = 2794; FP = 27:::: = .75
display 84 / (84 + 0.5*(27 + 29)) 
* Manually Calculate MCC = (TP*TN - FP*FN) / (sqrt((TP+FP)*(TP+FN)*(TN+FP)*(TN+FN))) ::::: = .7401
display (84*2794 - 27*29) / (sqrt((84+27)*(84+29)*(2794+27)*(2794+29)))
logit irredentism MAJ2 PROP2 PART2 irrmargin  hostdispersed irrhigh irrlow hostdiscrim countryGDPRATIO anoano anono noano hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using modelcompare.doc, dec(2) append ctitle(NewInst)
fitstat, using(m1) saving(m2)
estat classification
lroc
*Manually Calculate F1 = TP / (TP + 0.5*(FP + FN)): TP = 86; FN = 27; TN = 2799; FP = 22 ::: = .77828
display 86 / (86 + 0.5*(22 + 27))
* Manually Calculate MCC = (TP*TN - FP*FN) / (sqrt((TP+FP)*(TP+FN)*(TN+FP)*(TN+FN))) :::: = .76982
display (86*2799 - 22*27) / (sqrt((86+22)*(86+27)*(2799+22)*(2799+27)))
logit irredentism MAJ2 PROP2 PART2 irrmargin MAJ2Xirrmargin hostdispersed irrhigh irrlow hostdiscrim countryGDPRATIO anoano anono noano hosttpop irrtpop logpowerdisparity IrrFSoviet HostFSoviet peaceyrs peaceyrssquared peaceyrscubed, cluster(triadcode) 
outreg2 using modelcompare.doc, dec(2) append ctitle(Interact)
fitstat, using(m2)
estat classification
lroc
*Manually Calculate F1 = TP / (TP + 0.5*(FP + FN)): TP = 87; FN = 26; TN = 2799; FP = 22 ::: = 0.7837
display 87 / (87 + 0.5*(22 + 26))
* Manually Calculate MCC = (TP*TN - FP*FN) / (sqrt((TP+FP)*(TP+FN)*(TN+FP)*(TN+FN))) :::: = 0.775421
display (87*2799 - 22*26) / (sqrt((87+22)*(87+26)*(2799+22)*(2799+26)))





